package deom.controller;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class YmlController {
    @Autowired
    private Student student;
    //@PostConstruct
    public void test() {
        System.out.println("========================");
        System.out.println(student);
//        System.out.println(student.getId());
//        System.out.println(student.getName());
//        System.out.println(student.getAge());
        System.out.println("========================");
    }

    @Value("${string.str1}")
    private String str1;
    @Value("${string.str2}")
    private String str2;
    @Value("${string.str3}")
    private String str3;

    @Value("${mykey}")
    private String value;

    @Value("${key.you.love}")
    private String love;
    @Value("${test}")
    private int num;

   // @PostConstruct
    public void getValue() {
        System.out.println(value);
        System.out.println("========================");
        System.out.println(str1);
        System.out.println(str2);
        System.out.println(str3);
        System.out.println("========================");
    }
}
